Integrand size = 27, antiderivative size = 206 \[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{a+b \sec (e+f x)} \, dx=-\frac {b \operatorname {AppellF1}\left (\frac {1}{2},\frac {n p}{2},1,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) \cos ^2(e+f x)^{\frac {n p}{2}} \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{\left (a^2-b^2\right ) f}+\frac {a \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2} (-1+n p),1,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) \cos ^2(e+f x)^{\frac {1}{2} (-1+n p)} \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{\left (a^2-b^2\right ) f} \]
[Out]
Time = 0.63 (sec) , antiderivative size = 206, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {4033, 3954, 2902, 3268, 440} \[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{a+b \sec (e+f x)} \, dx=\frac {a \sin (e+f x) \cos (e+f x) \cos ^2(e+f x)^{\frac {1}{2} (n p-1)} \left (c (d \sec (e+f x))^p\right )^n \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2} (n p-1),1,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right )}{f \left (a^2-b^2\right )}-\frac {b \sin (e+f x) \cos ^2(e+f x)^{\frac {n p}{2}} \left (c (d \sec (e+f x))^p\right )^n \operatorname {AppellF1}\left (\frac {1}{2},\frac {n p}{2},1,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right )}{f \left (a^2-b^2\right )} \]
[In]
[Out]
Rule 440
Rule 2902
Rule 3268
Rule 3954
Rule 4033
Rubi steps \begin{align*} \text {integral}& = \left ((d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \frac {(d \sec (e+f x))^{n p}}{a+b \sec (e+f x)} \, dx \\ & = \left (\cos ^{n p}(e+f x) \left (c (d \sec (e+f x))^p\right )^n\right ) \int \frac {\cos ^{1-n p}(e+f x)}{b+a \cos (e+f x)} \, dx \\ & = -\left (\left (a \cos ^{n p}(e+f x) \left (c (d \sec (e+f x))^p\right )^n\right ) \int \frac {\cos ^{2-n p}(e+f x)}{b^2-a^2 \cos ^2(e+f x)} \, dx\right )+\left (b \cos ^{n p}(e+f x) \left (c (d \sec (e+f x))^p\right )^n\right ) \int \frac {\cos ^{1-n p}(e+f x)}{b^2-a^2 \cos ^2(e+f x)} \, dx \\ & = \frac {\left (b \cos ^2(e+f x)^{\frac {n p}{2}} \left (c (d \sec (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \frac {\left (1-x^2\right )^{-\frac {n p}{2}}}{-a^2+b^2+a^2 x^2} \, dx,x,\sin (e+f x)\right )}{f}-\frac {\left (a \cos ^{n p+2 \left (\frac {1}{2}-\frac {n p}{2}\right )}(e+f x) \cos ^2(e+f x)^{-\frac {1}{2}+\frac {n p}{2}} \left (c (d \sec (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \frac {\left (1-x^2\right )^{\frac {1}{2} (1-n p)}}{-a^2+b^2+a^2 x^2} \, dx,x,\sin (e+f x)\right )}{f} \\ & = -\frac {b \operatorname {AppellF1}\left (\frac {1}{2},\frac {n p}{2},1,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) \cos ^2(e+f x)^{\frac {n p}{2}} \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{\left (a^2-b^2\right ) f}+\frac {a \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2} (-1+n p),1,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) \cos ^2(e+f x)^{\frac {1}{2} (-1+n p)} \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{\left (a^2-b^2\right ) f} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(5411\) vs. \(2(206)=412\).
Time = 32.62 (sec) , antiderivative size = 5411, normalized size of antiderivative = 26.27 \[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{a+b \sec (e+f x)} \, dx=\text {Result too large to show} \]
[In]
[Out]
\[\int \frac {\left (c \left (d \sec \left (f x +e \right )\right )^{p}\right )^{n}}{a +b \sec \left (f x +e \right )}d x\]
[In]
[Out]
\[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{a+b \sec (e+f x)} \, dx=\int { \frac {\left (\left (d \sec \left (f x + e\right )\right )^{p} c\right )^{n}}{b \sec \left (f x + e\right ) + a} \,d x } \]
[In]
[Out]
\[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{a+b \sec (e+f x)} \, dx=\int \frac {\left (c \left (d \sec {\left (e + f x \right )}\right )^{p}\right )^{n}}{a + b \sec {\left (e + f x \right )}}\, dx \]
[In]
[Out]
\[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{a+b \sec (e+f x)} \, dx=\int { \frac {\left (\left (d \sec \left (f x + e\right )\right )^{p} c\right )^{n}}{b \sec \left (f x + e\right ) + a} \,d x } \]
[In]
[Out]
\[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{a+b \sec (e+f x)} \, dx=\int { \frac {\left (\left (d \sec \left (f x + e\right )\right )^{p} c\right )^{n}}{b \sec \left (f x + e\right ) + a} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{a+b \sec (e+f x)} \, dx=\int \frac {{\left (c\,{\left (\frac {d}{\cos \left (e+f\,x\right )}\right )}^p\right )}^n}{a+\frac {b}{\cos \left (e+f\,x\right )}} \,d x \]
[In]
[Out]